package org.yzl.designPatterns.bridge;

import org.yzl.designPatterns.bridge.impl.BridgeImpl1;
import org.yzl.designPatterns.bridge.impl.BridgeImpl2;

/**
 * 桥接模式
 */
public class BridgeTest {
    public static void main(String[] args) {
        Bridge bridge = new Bridge();
        bridge.setiBridge(new BridgeImpl1());
        bridge.method();

        bridge.setiBridge(new BridgeImpl2());
        bridge.method();
    }
}
